package com.kehutong.charge.entity;

import com.kehutong.charge.util.enums.*;
import com.kehutong.common.entity.DataEntity;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.annotation.UnSave;
import org.coraframework.orm.util.IDType;

import java.math.BigDecimal;
import java.util.List;

/**
 * @program: kht
 * @description: ChargeProject
 * @author: joneron
 * @create: 2021/6/23
 **/
@Table(value="t_charge_project_config", comment="收费项目管理表",multi = true, idType = IDType.TIMESTAMP, engine = "innodb")
public class ChargeProjectConfig extends DataEntity {

    protected ChargeProjectConfig(String id) {
        super(id);
    }

    @Column(comment="所属小区编号")
    private String communityNo;

    @Column(comment="所属小区名称")
    private String communityName;

    @Column(comment="收费项目名称")
    private String projectFeeName;

    @Column(comment="收费类型Id")
    private String feeTypeNo;

    @Column(comment="收费类型名称")
    private String feeTypeName;

    @Column(comment="计价方式")
    private ChargeCalcEnum calcEnum;

    @Column(comment="收费方式")
    private ChargeFeeEnum feeEnum;

    @UnSave
    private List<ChargeLadderConfig> ladderList;

    @Column(comment="价格")
    private BigDecimal price;

    @Column(comment="是否保底价")
    private boolean guarantee;

    @Column(comment="用量范围")
    private BigDecimal usageStart;

    @Column(comment="用量范围")
    private BigDecimal usageEnd;

    @Column(comment="用量范围价格")
    private BigDecimal usagePrice;

    @Column(comment="是否开启违约金")
    private boolean lateFee;

    @Column(comment="违约金比例")
    private Integer lateFeeNum;

    @Column(comment="违约金计算百分比")
    private PriceUnitEnum lateFeeScale;

    @Column(comment="违约金计算单位")
    private DateUnitEnum lateFeeUnit;

    @Column(comment="是否开发票")
    private boolean invoice;

    @Column(comment="发票税点")
    private Integer invoiceRax;

    @Column(comment = "状态：0禁用，1启用")
    private boolean status;

    @Column(comment = "排序")
    private Integer sort;

    @JSONField(serialize = false)
    @Column(comment = "逻辑删除")
    private boolean deleted;

    @Column(comment = "创建人")
    private String createName;

    @UnSave
    private MeterTypeConfig meterTypeConfig;

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    @Column(comment = "修改人")
    private String updateName;



    public String getCommunityNo() {
        return communityNo;
    }

    public void setCommunityNo(String communityNo) {
        this.communityNo = communityNo;
    }

    public String getFeeTypeName() {
        return feeTypeName;
    }

    public void setFeeTypeName(String feeTypeName) {
        this.feeTypeName = feeTypeName;
    }

    public String getProjectFeeName() {
        return projectFeeName;
    }

    public void setProjectFeeName(String projectFeeName) {
        this.projectFeeName = projectFeeName;
    }

    public ChargeCalcEnum getCalcEnum() {
        return calcEnum;
    }

    public void setCalcEnum(ChargeCalcEnum calcEnum) {
        this.calcEnum = calcEnum;
    }

    public ChargeFeeEnum getFeeEnum() {
        return feeEnum;
    }

    public void setFeeEnum(ChargeFeeEnum feeEnum) {
        this.feeEnum = feeEnum;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getUsageStart() {
        return usageStart;
    }

    public void setUsageStart(BigDecimal usageStart) {
        this.usageStart = usageStart;
    }

    public BigDecimal getUsageEnd() {
        return usageEnd;
    }

    public void setUsageEnd(BigDecimal usageEnd) {
        this.usageEnd = usageEnd;
    }

    public BigDecimal getUsagePrice() {
        return usagePrice;
    }

    public void setUsagePrice(BigDecimal usagePrice) {
        this.usagePrice = usagePrice;
    }

    public Integer getLateFeeNum() {
        return lateFeeNum;
    }

    public void setLateFeeNum(Integer lateFeeNum) {
        this.lateFeeNum = lateFeeNum;
    }

    public PriceUnitEnum getLateFeeScale() {
        return lateFeeScale;
    }

    public void setLateFeeScale(PriceUnitEnum lateFeeScale) {
        this.lateFeeScale = lateFeeScale;
    }

    public DateUnitEnum getLateFeeUnit() {
        return lateFeeUnit;
    }

    public void setLateFeeUnit(DateUnitEnum lateFeeUnit) {
        this.lateFeeUnit = lateFeeUnit;
    }

    public boolean isInvoice() {
        return invoice;
    }

    public void setInvoice(boolean invoice) {
        this.invoice = invoice;
    }

    public Integer getInvoiceRax() {
        return invoiceRax;
    }

    public void setInvoiceRax(Integer invoiceRax) {
        this.invoiceRax = invoiceRax;
    }

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

    public boolean isGuarantee() {
        return guarantee;
    }

    public void setGuarantee(boolean guarantee) {
        this.guarantee = guarantee;
    }

    public boolean isLateFee() {
        return lateFee;
    }

    public void setLateFee(boolean lateFee) {
        this.lateFee = lateFee;
    }

    public List<ChargeLadderConfig> getLadderList() {
        return ladderList;
    }

    public void setLadderList(List<ChargeLadderConfig> ladderList) {
        this.ladderList = ladderList;
    }

    public String getFeeTypeNo() {
        return feeTypeNo;
    }

    public void setFeeTypeNo(String feeTypeNo) {
        this.feeTypeNo = feeTypeNo;
    }

    public MeterTypeConfig getMeterTypeConfig() {
        return meterTypeConfig;
    }

    public void setMeterTypeConfig(MeterTypeConfig meterTypeConfig) {
        this.meterTypeConfig = meterTypeConfig;
    }
}
